home *** CD-ROM | disk | FTP | other *** search
- .model tiny
- locals
- .386
- .code
-
- ORG 0050h
-
- Main proc
- push di
- push es
- push cs
- pop es
- push cs
- pop ds
- mov ax, cs
- mov di, offset RegAX
- call Ponlo
- pop es
- mov ax, es
- push cs
- pop es
- mov di, offset RegBX
- call Ponlo
- mov ax, cx
- mov di, offset RegCX
- call Ponlo
- mov ax, dx
- mov di, offset RegDX
- call Ponlo
- mov ax, si
- mov di, offset RegSI
- call Ponlo
- pop di
- mov ax, di
- mov di, offset RegDI
- call Ponlo
- mov ax, bp
- mov di, offset RegBP
- call Ponlo
- mov ah, 09
- mov dx, offset Mensaje
- int 21h
- mov ax, 4c00h
- int 21h
- Main endp
-
- Ponlo proc
- mov byte ptr [control], 0
- jmp Salto
- Salto2: mov byte ptr [control], 1
- Salto: push ax
- push bx
- mov bx, offset Numero
- mov al, ah
- and ax, 0f00fh
- ror ah, 4
- xchg ah, al
- xlat
- stosb
- xchg ah, al
- xlat
- stosb
- pop bx
- pop ax
- cmp byte ptr [control], 1
- jz Acaba
- xchg ah, al
- jmp Salto2
- Acaba: ret
- Ponlo endp
-
- Numero db '0123456789ABCDEF'
-
- Control db 0
-
- Mensaje db 'AX='
- RegAX dd 0
- db ' BX='
- RegBX dd 0
- db ' CX='
- RegCX dd 0
- db ' DX='
- RegDX dd 0
- db ' SI='
- RegSI dd 0
- db ' DI='
- RegDI dd 0
- db ' BP='
- RegBP dd 0
- db '$'
-
- end Main
-